package com.qianya.system.manage.web.login.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qianya.system.manage.web.login.model.LoginOrganization;
import com.qianya.system.manage.web.login.service.ILoginOrganizationService;
import com.qianya.system.manage.web.login.mapper.LoginOrganizationMapper;
import org.springframework.stereotype.Service;
import com.qianya.model.common.CommonResult;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qianya.model.common.ResultCode;
import javax.servlet.http.HttpServletRequest;
/**
* <p>
*  机构服务实现类
* </p>
*
* @author lhl
* @since 2020-07-02
*/
@Service
public class LoginOrganizationServiceImpl extends ServiceImpl<LoginOrganizationMapper, LoginOrganization> implements ILoginOrganizationService {

        /**
        *查找 机构
        * @author lhl
        * @since 2020-07-02
        */
        @Override
        public CommonResult find(LoginOrganization loginOrganization) {
            IPage iPage = null;
            return CommonResult.success(iPage);
        }
        /**
        * 新增 机构
        * @author lhl
        * @since 2020-07-02
        */
        @Override
        public CommonResult create(LoginOrganization loginOrganization,HttpServletRequest request) {
            boolean b = save(loginOrganization);
            if (b){
                return CommonResult.success();
            }
            return CommonResult.error(ResultCode.ERROR,"操作失败");
        }
        /**
        * 修改 机构
        * @author lhl
        * @since 2020-07-02
        */
        @Override
        public CommonResult renewal(LoginOrganization loginOrganization,HttpServletRequest request) {
            boolean b = updateById(loginOrganization);
            if (b){
                return CommonResult.success();
            }
            return CommonResult.error(ResultCode.ERROR,"操作失败");
        }


}
